'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 任务
 * @author sundbcn@gmail.com (sun debing)
 */

var taskFactory = require('../libs/taskFactory');
var taskType = require('../consts/taskType');

/**
 * 添加获取的金币
 * TOTAL_GOLD: 1
 */
exports.addTotalGold = function (player_manager, add_gold) {
    _addAllStatic(player_manager, taskType.TOTAL_GOLD, add_gold);
};

/**
 * 添加获取的钻石
 * TOTAL_DIAMOND: 2
 */
exports.addTotalDiamond = function (player_manager, add_diamond) {
    _addAllStatic(player_manager, taskType.TOTAL_DIAMOND, add_diamond);
};

/**
 * 添加通关的三星副本
 * STAR_3_COPY: 3
 */
exports.addStar3Copy = function (player_manager, copy_id) {
    _addAllStatic(player_manager, taskType.STAR_3_COPY, copy_id);
};

/**
 * 添加主城等级
 * UPGRADE_NEXUS_NUM: 4
 */
exports.addUpgradeNexusNum = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_NEXUS_NUM, build_type, build_lv);
};

/**
 * 增加英雄等级
 * HERO_LV: 5
 */
exports.addHeroLv = function (player_manager, hero_lv) {
    _addAllStatic(player_manager, taskType.HERO_LV, hero_lv);
};

/**
 * 添加pvp的次数
 * BATTLE_NUM: 6
 */
exports.addBattleNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_NUM);
};

/**
 * 增加pvp的成功次数
 * BATTLE_WIN_NUM: 7
 */
exports.addBattleWinNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_WIN_NUM);
};

/**
 * 增加Pvp赚到的金币数量
 * BATTLE_EARN_TOTAL_GOLD: 8
 */
exports.addBattleEarnTotalGold = function (player_manager, earn_gold) {
    _addAllStatic(player_manager, taskType.BATTLE_EARN_TOTAL_GOLD, earn_gold);
};

/**
 * 增加pvp赚到的最大金币数量
 * BATTLE_EARN_GOLD_ONE_TIME: 9
 */
exports.addBattleEarnGoldOneTime = function (player_manager, earn_gold) {
    _addAllStatic(player_manager, taskType.BATTLE_EARN_GOLD_ONE_TIME, earn_gold);
};

/**
 * 增加pvp防御成功次数
 * BATTLE_DEF_WIN_NUM: 10
 */
exports.addBattleDefWinNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_DEF_WIN_NUM);
};

/**
 * 升级士兵
 * UPGRADE_SOLDIER_NUM: 11
 */
exports.addUpgradeSoldierNum = function (player_manager, soldier_max_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_SOLDIER_NUM, soldier_max_lv);
};

/**
 * 开启第3个技能槽
 * UNLOCK_SKILL_SELECT: 13
 */
exports.addUnlockSkillSelect = function (player_manager) {
    _addAllStatic(player_manager, taskType.UNLOCK_SKILL_SELECT);
};

/**
 * 开启第3个士兵槽
 * UNLOCK_SOLDIER_SELECT: 14
 */
exports.addUnlockSoldierSelect = function (player_manager) {
    _addAllStatic(player_manager, taskType.UNLOCK_SOLDIER_SELECT);
};

/**
 * 有一个英雄技能等达到N级
 * HERO_SKILL_LV: 15
 */
exports.addHeroSkillLv = function (player_manager, skill_lv) {
    _addAllStatic(player_manager, taskType.HERO_SKILL_LV, skill_lv);
};

/**
 * 建造N座防御塔
 * UNLOCK_TOWER: 16
 */
exports.addUnlockTower = function (player_manager, tower_num) {
    _addAllStatic(player_manager, taskType.UNLOCK_TOWER, tower_num);
};

/**
 * 拆除N座废墟
 * CLEAR_RUIN_NUM: 17
 */
exports.addClearRuinNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.CLEAR_RUIN_NUM);
};

/**
 * 历史奖杯数量达到N
 * CUP_NUM: 18
 */
exports.addCupNum = function (player_manager, cup_num) {
    _addAllStatic(player_manager, taskType.CUP_NUM, cup_num);
};

/**
 * 累计使用护盾时长达到N小时
 * PROTECT_TIME: 19
 */
exports.addProtectTime = function (player_manager, protect_time) {
    _addAllStatic(player_manager, taskType.PROTECT_TIME, protect_time);
};

/**
 * 竞技场排名到多少以内
 * RANK: 20
 * todo: 现在没排名
 */
exports.addRank = function (player_manager, rank) {
    _addAllStatic(player_manager, taskType.RANK, rank);
};

/**
 * 升级N级金矿
 * UPGRADE_MINE_NUM: 21
 */
exports.addtaskMine = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_MINE_NUM, build_type, build_lv);
};

/**
 * 升级N级金库
 * UPGRADE_CHEST_NUM: 22
 */
exports.addtaskChest = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_CHEST_NUM, build_type, build_lv);
};

/**
 * 升级N级金矿
 * UPGRADE_FARM_NUM: 23
 */
exports.addtaskFarm = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_FARM_NUM, build_type, build_lv);
};

/**
 * 升级N级粮仓
 * UPGRADE_BARN_NUM: 24
 */
exports.addtaskBarn = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_BARN_NUM, build_type, build_lv);
};

/**
 * 升级N级练兵场
 * UPGRADE_PARADE_NUM: 25
 */
exports.addtaskParade = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_PARADE_NUM, build_type, build_lv);
};

/**
 * 升级N级飞艇
 * UPGRADE_AIRSHIP_NUM: 26
 */
exports.addtaskAirship = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_AIRSHIP_NUM, build_type, build_lv);
};

/**
 * 升级N级铁匠铺
 * UPGRADE_SMITHY_NUM: 28
 */
exports.addtaskSmithy = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_SMITHY_NUM, build_type, build_lv);
};

/**
 * 升级N级城墙
 * UPGRADE_WALL_NUM: 29
 */
exports.addtaskWall = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_WALL_NUM, build_type, build_lv);
};

/**
 * 升级N级行军大厅
 * UPGRADE_MARCHHALL_NUM: 30
 */
exports.addtaskMarchhall = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_MARCHHALL_NUM, build_type, build_lv);
};

/**
 * 升级N级指挥中心
 * UPGRADE_ATELIER_NUM: 31
 */
exports.addtaskAtelier = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_ATELIER_NUM, build_type, build_lv);
};

/**
 * 升级N级英雄学院
 * UPGRADE_HEROCOLLEGE_NUM: 32
 */
exports.addtaskHerocollege = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_HEROCOLLEGE_NUM, build_type, build_lv);
};

/**
 * 升级N级士兵学院
 * UPGRADE_SOLDIERCOLLEGE_NUM: 33
 */
exports.addtaskSoldiercollege = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_SOLDIERCOLLEGE_NUM, build_type, build_lv);
};

/**
 * 升级N级研究院
 * UPGRADE_ACADEMY_NUM: 34
 */
exports.addtaskAcademy = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_ACADEMY_NUM, build_type, build_lv);
};

/**
 * 升级N级许愿树
 * UPGRADE_WISHTREE_NUM: 35
 */
exports.addtaskWishtree = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_WISHTREE_NUM, build_type, build_lv);
};

/**
 * 升级技能
 * UPGRADE_SKILL_NUM: 36
 */
exports.addUpgradeSkill = function (player_manager) {
    _addAllStatic(player_manager, taskType.UPGRADE_SKILL_NUM);
};

/**
 * 升级科技
 * UPGRADE_TECH_NUM: 37
 */
exports.addUpgradeTech = function (player_manager) {
    _addAllStatic(player_manager, taskType.UPGRADE_TECH_NUM);
};

/**
 * 兑换物品
 * UPGRADE_CONSUME_NUM: 38
 */
exports.addUpgradeConsume = function (player_manager) {
    _addAllStatic(player_manager, taskType.UPGRADE_CONSUME_NUM);
};

/**
 * 提升装备
 * UPGRADE_EQUIP_NUM: 39
 */
exports.addUpgradeEquip = function (player_manager) {
    _addAllStatic(player_manager, taskType.UPGRADE_EQUIP_NUM);
};

/**
 * 改造道路任务
 * UPGRADE_ROAD_NUM: 40
 */
exports.addUpgradeRoad = function (player_manager) {
    _addAllStatic(player_manager, taskType.UPGRADE_ROAD_NUM);
};

/**
 * 兵营升级任务
 * UPGRADE_BARRACK_NUM: 41
 */
exports.addtaskBarrack = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_BARRACK_NUM, build_type, build_lv);
};

/**
 * 防御塔升级任务
 * UPGRADE_DEFENSE_NUM: 42
 */
exports.addtaskDefense = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_DEFENSE_NUM, build_type, build_lv);
};

/**
 * 路障升级任务
 * UPGRADE_ROAD_BLOCK_NUM: 43
 */
exports.addtaskRoadBlock = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_ROAD_BLOCK_NUM, build_type, build_lv);
};

/**
 * 地雷升级任务
 * UPGRADE_LANDMINE: 44
 */
exports.addtaskUpgradeRoad = function (player_manager, build_type, build_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_LANDMINE, build_type, build_lv);
};

/**
 * 5星防御塔任务
 * DEF_BUILD_STAR_FIVE: 47
 */
exports.addTaskDifBuildStarFive = function (player_manager) {
    _addAllStatic(player_manager, taskType.DEF_BUILD_STAR_FIVE);
};

/**
 * 5星士兵任务
 * SOLDIER_STAR_FIVE: 48
 */
exports.addTaskSoldierStarFive = function (player_manager) {
    _addAllStatic(player_manager, taskType.SOLDIER_STAR_FIVE);
};

/**
 * 士兵升星任务
 * SOLDIER_STAR_ALL: 49
 */
exports.addTaskSoldierStarAll = function (player_manager, soldier_star_lv) {
    _addAllStatic(player_manager, taskType.SOLDIER_STAR_ALL, soldier_star_lv);
};

/**
 * 士兵升级任务
 * UPGRADE_SOLDIER: 50
 */
exports.addTaskUpgradeSoldier = function (player_manager, soldier_lv) {
    _addAllStatic(player_manager, taskType.UPGRADE_SOLDIER, soldier_lv);
};

/**
 * 防御塔强化（升星）
 * UPGRADE_DEFBUILD_START: 51
 */
exports.addTaskUpgradeDefBuildStart = function (player_manager) {
    _addAllStatic(player_manager, taskType.UPGRADE_DEFBUILD_START);
};

/**
 * 主线副本任务
 * PASS_COPY: 101
 */
exports.addPassCopy = function (player_manager, copy_id) {
    _addAllStatic(player_manager, taskType.PASS_COPY, copy_id);
};

/**
 * 进行N次战役
 * PASS_COPY_NUM: 202
 */
exports.addPassCopyNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.PASS_COPY_NUM);
};

/**
 * 进行N次竞技场挑战
 * RANK_FIGHT_NUM: 203
 * todo: 没有竞技场
 */
exports.addRankFightNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.RANK_FIGHT_NUM);
};

/**
 * 进行N次道具融合
 * COMPOSE: 204
 */
exports.addCompose = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPOSE);
};

/**
 * 进行N次装备强化
 * EQUIP_UPGRADE: 205
 */
exports.addEquipUpgrade = function (player_manager) {
    _addAllStatic(player_manager, taskType.EQUIP_UPGRADE);
};

/**
 * 进行N次装备重铸
 * EQUIP_RESET: 206
 */
exports.addEquipReset = function (player_manager) {
    _addAllStatic(player_manager, taskType.EQUIP_RESET);
};

/**
 * 挑战N次世界BOSS
 * WORLD_BOSS_NUM: 207
 */
exports.addWorldBossNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.WORLD_BOSS_NUM);
};

/**
 * 领取体力N次
 * FREE_ENERGY_NUM: 208
 */
exports.addFreeEnergy = function (player_manager) {
    _addAllStatic(player_manager, taskType.FREE_ENERGY_NUM);
};

/**
 * 成功升级任意一个建筑
 * BUILD_UPGRADE_TASK_NUM: 209
 */
exports.addBuildUpgrade = function (player_manager) {
    _addAllStatic(player_manager, taskType.BUILD_UPGRADE_TASK_NUM);
};

/**
 * 扫荡关卡N次
 * SECRETSWEEP_NUM: 210
 */
exports.addSecretsweep = function (player_manager) {
    _addAllStatic(player_manager, taskType.SECRETSWEEP_NUM);
};

/**
 * 完成N次任意抽卡
 * LUCKITEM_NUM: 211
 */
exports.addLuckitem = function (player_manager) {
    _addAllStatic(player_manager, taskType.LUCKITEM_NUM);
};

/**
 * 购买N次粮食或金币
 * BUY_RESOURCES_NUM: 212
 */
exports.addBuyResources = function (player_manager) {
    _addAllStatic(player_manager, taskType.BUY_RESOURCES_NUM);
};

/**
 * 刷新N次市场
 * REFRESH_MARKET_NUM: 213
 */
exports.addRefreshMarket = function (player_manager) {
    _addAllStatic(player_manager, taskType.REFRESH_MARKET_NUM);
};

/**
 * 收取N次粮食或金币
 * RECEIVE_RESOURCES_NUM: 214
 */
exports.addReceiveResources = function (player_manager) {
    _addAllStatic(player_manager, taskType.RECEIVE_RESOURCES_NUM);
};

/**
 * 尝试掠夺1名玩家
 * BATTLE_ONE_NUM: 215
 */
exports.addBattleOne = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_ONE_NUM);
};

/**
 * 尝试掠夺N名玩家
 * BATTLE_NUM_NUM: 216
 */
exports.addBattleInNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_NUM_NUM);
};

/**
 * 尝试掠夺n名玩家成功
 * BATTLE_SUCCESS_NUM: 217
 */
exports.addBattleSuccess = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_SUCCESS_NUM);
};

/**
 * 进行N次防守模拟战
 * BATTLE_DEFENSE_NUM: 218
 */
exports.addBattleDefense = function (player_manager) {
    _addAllStatic(player_manager, taskType.BATTLE_DEFENSE_NUM);
};

/**
 * 给N位好友赠送钻石
 * FRIENDS_DIAMOND_NUM: 219
 */
exports.addFriendsDiamond = function (player_manager) {
    _addAllStatic(player_manager, taskType.FRIENDS_DIAMOND_NUM);
};

/**
 * 世界聊天发送N次消息
 * WORLD_CHAT_NUM: 220
 */
exports.addWorldChat = function (player_manager) {
    _addAllStatic(player_manager, taskType.WORLD_CHAT_NUM);
};

/**
 * 完成N次装备提升
 * EQUIP_UPGRADE_NUM: 221
 */
exports.addEquipUpgrade = function (player_manager) {
    _addAllStatic(player_manager, taskType.EQUIP_UPGRADE_NUM);
};

/**
 * 完成N次许愿
 * COMPLETE_WISHTREE_NUM: 222
 */
exports.addCompleteWishtree = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_WISHTREE_NUM);
};

/**
 * 完成N次叛军来袭
 * COMPLETE_SWEEP_NUM: 223
 */
exports.addComplete = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_SWEEP_NUM);
};

/**
 * 参加N次生存挑战
 * IN_SURVIVAL_NUM: 224
 */
exports.addInSurvival = function (player_manager) {
    _addAllStatic(player_manager, taskType.IN_SURVIVAL_NUM);
};

/**
 * 参加N次魔窟远征
 * IN_MORGUI_NUM: 225
 */
exports.addInMorgui = function (player_manager) {
    _addAllStatic(player_manager, taskType.IN_MORGUI_NUM);
};

/**
 * 购买月卡，每天可领取N钻石
 * BUY_CARD_NUM: 226
 */
exports.addBuyCard = function (player_manager) {
    _addAllStatic(player_manager, taskType.BUY_CARD_NUM);
};

/**
 * 每天12点至14点领取N点体力
 * RECEIVE_SP_NUM: 227
 */
exports.addReceiveSp = function (player_manager) {
    _addAllStatic(player_manager, taskType.RECEIVE_SP_NUM);
};

/**
 * 完成N次市场购买
 * RECEIVE_MARKET_NUM: 228
 */
exports.addBuyMarket = function (player_manager) {
    _addAllStatic(player_manager, taskType.RECEIVE_MARKET_NUM);
};

/**
 * 通关副本累计获得N星
 * COPY_STAR_TOTAL: 301
 */
exports.addCopyStarTotal = function (player_manager, star) {
    _addAllStatic(player_manager, taskType.COPY_STAR_TOTAL, star);
};

/**
 * 拥有n星士兵的N个
 * SOLDIER_NUM_STAR_TOTAL: 303
 */
exports.addSoldierNumStarTotal = function (player_manager, star, num) {
    _addAllStatic(player_manager, taskType.SOLDIER_NUM_STAR_TOTAL, star, num);
};

/**
 * 拥有n星防御塔N个
 * BUILD_DEF_STAR_NUM_TOTAL: 304
 */
exports.addBuildDefStarNumTotal = function (player_manager, def_build_star, num) {
    _addAllStatic(player_manager, taskType.BUILD_DEF_STAR_NUM_TOTAL, def_build_star, num);
};

/**
 * 拥有N级士兵N个
 * SOLDIER_LVL_NUM_TOTAL: 305
 */
exports.addSoldierLvlNumTotal = function (player_manager, soldier_lv, num) {
    _addAllStatic(player_manager, taskType.SOLDIER_LVL_NUM_TOTAL, soldier_lv, num);
};

/**
 * 竞技场挑战胜利次数
 * ARENA_WIN_NUM: 310
 */
exports.addArenaWinNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.ARENA_WIN_NUM);
};

/**
 * 完成联盟任务次数
 * COMPLETE_UNION_TASK_NUM: 311
 */
exports.addCompleteUnionTaskNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_UNION_TASK_NUM);
};

/**
 * 铁匠铺锻造次数
 * SMITHY_FORGING_NUM: 312
 */
exports.addSmithyForgingNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.SMITHY_FORGING_NUM);
};

/**
 * 联盟帮助次数
 * UNION_HELP_NUM: 313
 */
exports.addUnionHelpNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.UNION_HELP_NUM);
};

/**
 * 金币，粮食副本次数
 * GOLD_FOOD_COPY_NUM: 314
 */
exports.addGoldFoodCopyNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.GOLD_FOOD_COPY_NUM);
};

/**
 * 参与世界BOSS次数
 * JOIN_CHAT_BOSS_NUM: 315
 */
exports.addJoinChatBossNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.JOIN_CHAT_BOSS_NUM);
};

/**
 * 完成每日任务次数
 * COMPLETE_EVERYDAY_ACTIVE_NUM: 316
 */
exports.addCompleteEverydayNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_EVERYDAY_ACTIVE_NUM);
};

/**
 * 英雄穿戴装备全部升级到10级
 * HERO_EQUI_LV_TOTAL: 317
 */
exports.addHeroEquiLvTotal = function (player_manager, min) {
    _addAllStatic(player_manager, taskType.HERO_EQUI_LV_TOTAL, min);
};

/**
 * 联盟捐赠次数
 * UNION_DONATION_NUM: 318
 */
exports.addUnionDonationNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.UNION_DONATION_NUM);
};

/**
 * pvp奖杯达到N
 * PVP_CUP_NUM: 319
 */
exports.addPvpCupNum = function (player_manager, cup_num) {
    _addAllStatic(player_manager, taskType.PVP_CUP_NUM, cup_num);
};

//  新任务统计 ////////////*********************//////////////////////******************///////
/**
 * 升级任务N次科技(repeat)
 * UP_TECH_NUM: 320
 */
exports.addUpTechNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.UP_TECH_NUM);
};

/**
 * 完成任务n次魔窟远征玩法
 * COMPLETE_MORGUI_NUM: 322
 */
exports.addCompleteMorguiNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_MORGUI_NUM);
};

/**
 * 完成n 次试练玩法
 * COMPLETE_TRAIN_NUM: 323
 */
exports.addCompleteTrainNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_TRAIN_NUM);
};

/**
 * 完成n次英雄装备 强化
 * COMPLETE_HERO_EQUIT_UP: 324
 */
exports.addCompleteHeroEquitUp = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_HERO_EQUIT_UP);
};

/**
 * 完成n 次资源收取(repeat)
 * COMPLETE_RESOURCES_RECEIVE: 325
 */
exports.addCompleteResourcesReceive = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_RESOURCES_RECEIVE);
};

/**
 * 完成任意n 次铁匠锻造(repeat)
 * COMPLETE_SMITHY_FORGING: 326
 */
exports.addCompleteSmithyForging = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_SMITHY_FORGING);
};

/**
 * 完成n 次世界发言
 * COMPLETE_CHAT_MSG: 327
 */
exports.addCompleteChatMsg = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_CHAT_MSG);
};

/**
 * 完成n 次联盟boos挑战
 * COMPLETE_UNION_BOOS: 328
 */
exports.addCompleteUnionBoos = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_UNION_BOOS);
};

/**
 * 完成任意 n 次军功宝箱开启
 * COMPLETE_MILITARY_EXPLOIT: 329
 */
exports.addCompleteMilitaryExploit = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_MILITARY_EXPLOIT);
};

/**
 * 完成任意 n次大转盘
 * COMPLETE_LUCKY_NUM: 330
 */
exports.addCompleteLuckyNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_LUCKY_NUM);
};

/**
 * 完成任意n 次幸运宝箱抽奖
 * COMPLETE_LUCKY_BOX_NUM: 331
 */
exports.addCompleteLuckyBoxNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_LUCKY_BOX_NUM);
};

/**
 * 英雄 天赋觉醒n  次
 * COMPLETE_HERO_CONSTELLATION: 332
 */
exports.addCompleteHeroConstellation = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_HERO_CONSTELLATION);
};

/**
 * 士兵 天赋觉醒n次
 * COMPLETE_SOLDIER_TALENT: 333
 */
exports.addCompleteSoldierTalent = function (player_manager) {
    _addAllStatic(player_manager, taskType.COMPLETE_SOLDIER_TALENT);
};

/**
 * 购买 n 次体力
 * BUY_NUM_ENERGY: 334
 */
exports.addCompleteBuyNumEnergy = function (player_manager) {
    _addAllStatic(player_manager, taskType.BUY_NUM_ENERGY);
};

/**
 * 竞技场参与次数
 * ARENA_JOIN_NUM: 335
 */
exports.addCompleteArenaJoinNum = function (player_manager) {
    _addAllStatic(player_manager, taskType.ARENA_JOIN_NUM);
};

/**
 * 添加统计
 * @param {[type]} player_manager       [description]
 * @param {[type]} task_static_type [description]
 * @param {[type]} static_data      [description]
 */
var _addAllStatic = function (player_manager, task_static_type, param1, param2) {
    _addStatic(player_manager.task, task_static_type, param1, param2);
    _addStatic(player_manager.daily_task, task_static_type, param1, param2);
    _addStatic(player_manager.achieve, task_static_type, param1, param2);
    _addStatic(player_manager.sevenDayActivity, task_static_type, param1, param2);
};

/**
 * 添加统计
 * @param {[type]} task_model       [description]
 * @param {[type]} task_static_type [description]
 * @param {[type]} static_data      [description]
 */
var _addStatic = function (task_model, task_static_type, param1, param2) {
    if (!task_model) {
        return;
    }
    taskFactory.getInstance(task_static_type).addStatic(
        task_model.getStaticList(task_static_type),
        param1,
        param2
    );
    task_model.setChange();
};
